{include file="public_head" /}

<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">
<!-- chk_3 -->
<link href="__STATIC__/css/chk_3.css" rel="stylesheet" type="text/css"/>

<body class="nav-md">

<div class="container body">


    <div class="main_container">

        {include file="public_sidebar,public_nav" /}

        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">
                <div class="page-title">
                    <div class="title_left">
                        <h3>
                            分销管理
                        </h3>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="row">

                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h3>{$mate_title}</h3>
                            </div>
                            <div class="x_content">
                                <form name="form" id="form" method="get" action="">

                                    <div class="title_left">
                                        <div class="col-md-3 col-sm-3 col-xs-12 form-group pull-left top_search">
                                            <div class="input-group" style="float: left;margin: 0 20px;">
                                                <select name="status" class="select2_single" style="width: 200px;"
                                                        tabindex="-1">
                                                    <option value="0" >全部</option>
                                                   {volist name="memberlevel_select" id="vo"}

                                                    <option value="{$vo.level}" {eq name=':input("status")' value="$vo.level|default='0'" }selected{/eq}>{$vo.level}级</option>
                                                    {/volist}
                                                </select>
                                            </div>
                                            <div class="input-group">
                                                <input type="text" class="form-control" name="title"
                                                       placeholder="输入搜索内容..." value="{:input('title')}">
                                            </div>
                                        </div>
                                        <button type="submit" class="btn btn-primary" style="margin-left: 10px;">搜 索
                                        </button>
                                    </div>

                                    <table class="table table-striped table-bordered">
                                        <thead>
                                        <tr>
                                            <td><input type="checkbox" class="checkall"
                                                       onclick="CheckAll(this.checked);"/></td>
                                            <th>id</th>
                                            <th>用户账号</th>
                                            <th>用户昵称</th>
                                            <th>分销级别</th>
                                            <th>申请时间</th>
                                            <!--<th>返利金额</th>-->
                                        </tr>
                                        </thead>

                                        <tbody>
                                        {volist name="data" id="item"}
                                        <tr>
                                            <td><input type="checkbox" name="id[]" value="{$item.id}"/></td>
                                            <td>{$item.referrals_id}</td>
                                            <td>{$item.username}</td>
                                            <!--<td>-->
                                                <!--{empty name="$item.name"}-->
                                                <!--<b style="color: #6F6F6F;">用户未设置</b>-->
                                                <!--{else /}-->
                                                <!--{$item.name}-->
                                                <!--{/empty}-->
                                            <!--</td>-->
                                            <td>
                                                {empty name="$item.nickname"}
                                                <b style="color: #6F6F6F;">用户未设置</b>
                                                {else /}
                                                {$item.nickname}
                                                {/empty}
                                            </td>
                                            <td>{$item.level}级</td>
                                            <td>{$item.create_time|date='Y-m-d H:i:s',###}</td>
                                        </tr>
                                        {/volist}
                                        </tbody>
                                    </table>
                                    <!-- 分页 -->
                                    <div style="float: right;margin-top: -30px;">{$data->render()}</div>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <!-- /page content -->
    </div>

</div>

{include file="public_foot" /}

<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<!-- public -->
<script src="__STATIC__/js/public.js"></script>
<!-- layer -->
<script src="__STATIC__/js/layer.js"></script>
<script type="text/javascript">
    // list
    $(document).ready(function () {
        // select2
        $(".select2_single").select2({
            placeholder: "请选择分类",
            allowClear: true
        });
    });
</script>
